package com.shao.demo.streamdemo.rabbitMq;


import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

/**
 * 创建用千接收来自RabbitMQ 消息的消费者SinkReceiver
 *
 * @author zhiqi.shao
 * @Date 2018/6/1 9:49
 */
@Slf4j
@EnableBinding({Sink.class})
public class SinkReceiver {

    @StreamListener(Sink.INPUT)
    public void receive(String message) {
        log.info("Received: " + message);
    }
}
